import Storage from "@/uitl/Storagehandle"; //sessionStorage的操作

export default {
  namespaced: true, //命名空间
  state: {
    //教师home主页选择的key
    selectedKeys: Storage.getItem("selectedKeys") || ["0"],
    selectedName: Storage.getItem("selectedName") || "",
  },
  getters: {},
  mutations: {
    setSelectedKeys(state, data) {
      Storage.setItem(`selectedKeys`, data);
      state.selectedKeys = data;
    },
    setSelectedName(state,data){
      Storage.setItem(`selectedName`, data);
      state.selectedName=data;
    }
  },
  actions: {},
  modules: {},
};
